package ws.performancetest.app.gui.dialog;

/**
 * This dialog show a warning message.
 * 
 * @author Wilson Santos, 36228 <wilson.santos@ua.pt>
 */
public class WarningDialog extends Dialog {

  private static final WarningDialog reference;

  static {
    reference = new WarningDialog();
    reference.addWindowListener(new java.awt.event.WindowAdapter() {

      @Override
      public void windowClosing(java.awt.event.WindowEvent e) {
        reference.setVisible(false);
      }
    });
  }

  public WarningDialog() {
    super(new javax.swing.JFrame(), true);
    label.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ws/performancetest/app/gui/imgs/warning-32.png"))); // NOI18N
  }

  public static void run(String message) {
    reference.label.setText(message);
    reference.setVisible(true);
  }
}
